package com.ruoyi.costumeShop.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.costumeShop.mapper.CostumeCategoryMapper;
import com.ruoyi.costumeShop.domain.CostumeCategory;
import com.ruoyi.costumeShop.service.ICostumeCategoryService;

/**
 * categoryService业务层处理
 * 
 * @author ruoyi
 * @date 2022-03-18
 */
@Service
public class CostumeCategoryServiceImpl implements ICostumeCategoryService 
{
    @Autowired
    private CostumeCategoryMapper costumeCategoryMapper;

    /**
     * 查询category
     * 
     * @param costumeCategoryId category主键
     * @return category
     */
    @Override
   public CostumeCategory selectCostumeCategoryByCostumeCategoryId(Long costumeCategoryId)
    {
        return costumeCategoryMapper.selectCostumeCategoryByCostumeCategoryId(costumeCategoryId);
    }

    /**
     * 查询category列表
     * 
     * @param costumeCategory category
     * @return category
     */
    @Override
    public List<CostumeCategory> selectCostumeCategoryList(CostumeCategory costumeCategory)
    {
        return costumeCategoryMapper.selectCostumeCategoryList(costumeCategory);
    }

    /**
     * 新增category
     * 
     * @param costumeCategory category
     * @return 结果
     */
    @Override
    public int insertCostumeCategory(CostumeCategory costumeCategory)
    {
        return costumeCategoryMapper.insertCostumeCategory(costumeCategory);
    }

    /**
     * 修改category
     * 
     * @param costumeCategory category
     * @return 结果
     */
    @Override
    public int updateCostumeCategory(CostumeCategory costumeCategory)
    {
        return costumeCategoryMapper.updateCostumeCategory(costumeCategory);
    }

    /**
     * 批量删除category
     * 
     * @param costumeCategoryIds 需要删除的category主键
     * @return 结果
     */
    @Override
    public int deleteCostumeCategoryByCostumeCategoryIds(Long[] costumeCategoryIds)
    {
        return costumeCategoryMapper.deleteCostumeCategoryByCostumeCategoryIds(costumeCategoryIds);
    }

    /**
     * 删除category信息
     * 
     * @param costumeCategoryId category主键
     * @return 结果
     */
    @Override
    public int deleteCostumeCategoryByCostumeCategoryId(Long costumeCategoryId)
    {
        return costumeCategoryMapper.deleteCostumeCategoryByCostumeCategoryId(costumeCategoryId);
    }
}
